//	ID : pallab81
// 	PROG : 11137
// 	LANG : C++
// 	2011-07-26-16.41.39 Tuesday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>

using namespace std;

#define fo(i,ed) for(int i = 0 ; i < ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

int V;
vector<Int> cando;
inline void doit(){
    cando.assign(V+9270, 0);
    cando[0]=1LL;
    for(int i=1; i*i*i <= V; ++i ){
        int I = i*i*i;
        for(int j=0;j<=V;++j){
            cando[ j+I ] = cando[j+I]+ cando[j];
        }
    }
    cout<<cando[V]<<"\n";
}

int main(){
    while(cin>>V){
        doit();
    }

return 0;
}


